/*
//  KRATOS  _____________
//         /  _/ ____/   |
//         / // / __/ /| |
//       _/ // /_/ / ___ |
//      /___/\____/_/  |_| Application
//
//  Main authors:   Thomas Oberbichler
*/

#if !defined(KRATOS_IGA_APPLICATION_VARIABLES_H_INCLUDED)
#define  KRATOS_IGA_APPLICATION_VARIABLES_H_INCLUDED

// System includes

// External includes

// Project includes
#include "includes/define.h"
#include "includes/variables.h"
#include "geometries/geometry.h"
#include "includes/node.h"

namespace Kratos
{

KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, double, CROSS_AREA)
  
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, double, TRUSS_PRESTRESS_CAUCHY)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, double, TRUSS_PRESTRESS_PK2)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, double, TRUSS_STRESS_CAUCHY)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, double, TRUSS_STRESS_PK2)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, double, TRUSS_FORCE)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, double, TANGENT_MODULUS)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, double, TRUSS_GREEN_LAGRANGE_STRAIN)

KRATOS_DEFINE_3D_APPLICATION_VARIABLE_WITH_COMPONENTS(IGA_APPLICATION, NODAL_INERTIA)

KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, double, PRESTRESS_CAUCHY)
KRATOS_DEFINE_SYMMETRIC_2D_TENSOR_APPLICATION_VARIABLE_WITH_COMPONENTS(IGA_APPLICATION, PRESTRESS)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, Vector, TANGENTS)

KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, double, CROSS_SECTIONAL_ROTATION)

KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, double, FORCE_PK2_1D)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, double, FORCE_CAUCHY_1D)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, double, PRINCIPAL_STRESS_1)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, double, PRINCIPAL_STRESS_2)

KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, Matrix, LOCAL_ELEMENT_ORIENTATION)
KRATOS_DEFINE_3D_APPLICATION_VARIABLE_WITH_COMPONENTS(IGA_APPLICATION, LOCAL_PRESTRESS_AXIS_1)
KRATOS_DEFINE_3D_APPLICATION_VARIABLE_WITH_COMPONENTS(IGA_APPLICATION, LOCAL_PRESTRESS_AXIS_2)

KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, double, RAYLEIGH_ALPHA)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, double, RAYLEIGH_BETA)

// 5p Director Shell Variables
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, bool, DIRECTOR_COMPUTED)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, Vector, DIRECTOR)
KRATOS_DEFINE_3D_APPLICATION_VARIABLE_WITH_COMPONENTS(IGA_APPLICATION, DIRECTORINC)
KRATOS_DEFINE_3D_APPLICATION_VARIABLE_WITH_COMPONENTS(IGA_APPLICATION, MOMENTDIRECTORINC)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, Matrix, DIRECTORTANGENTSPACE)
KRATOS_DEFINE_3D_APPLICATION_VARIABLE_WITH_COMPONENTS(IGA_APPLICATION, MOMENT_LINE_LOAD)

// Load Condition Variables
KRATOS_DEFINE_3D_APPLICATION_VARIABLE_WITH_COMPONENTS(IGA_APPLICATION, POINT_LOAD)
KRATOS_DEFINE_3D_APPLICATION_VARIABLE_WITH_COMPONENTS(IGA_APPLICATION, LINE_LOAD)
KRATOS_DEFINE_3D_APPLICATION_VARIABLE_WITH_COMPONENTS(IGA_APPLICATION, SURFACE_LOAD)

KRATOS_DEFINE_3D_APPLICATION_VARIABLE_WITH_COMPONENTS(IGA_APPLICATION, DEAD_LOAD)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, double, PRESSURE_FOLLOWER_LOAD)

// Geometry/curvature
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, double, CURVATURE)

//Stress Recovery Variables
KRATOS_DEFINE_SYMMETRIC_2D_TENSOR_APPLICATION_VARIABLE_WITH_COMPONENTS(IGA_APPLICATION, PK2_STRESS)
KRATOS_DEFINE_SYMMETRIC_2D_TENSOR_APPLICATION_VARIABLE_WITH_COMPONENTS(IGA_APPLICATION, CAUCHY_STRESS)
KRATOS_DEFINE_SYMMETRIC_2D_TENSOR_APPLICATION_VARIABLE_WITH_COMPONENTS(IGA_APPLICATION, CAUCHY_STRESS_TOP)
KRATOS_DEFINE_SYMMETRIC_2D_TENSOR_APPLICATION_VARIABLE_WITH_COMPONENTS(IGA_APPLICATION, CAUCHY_STRESS_BOTTOM)
KRATOS_DEFINE_SYMMETRIC_2D_TENSOR_APPLICATION_VARIABLE_WITH_COMPONENTS(IGA_APPLICATION, MEMBRANE_FORCE)
KRATOS_DEFINE_SYMMETRIC_2D_TENSOR_APPLICATION_VARIABLE_WITH_COMPONENTS(IGA_APPLICATION, INTERNAL_MOMENT)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, Vector, DIVERGENCE_STRESS)

KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, double, SHEAR_FORCE_1)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, double, SHEAR_FORCE_2)

KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, bool, INTEGRATE_CONSERVATIVE)

//Penalty Variables
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, double, PENALTY_FACTOR)
KRATOS_DEFINE_3D_APPLICATION_VARIABLE_WITH_COMPONENTS(IGA_APPLICATION, VECTOR_LAGRANGE_MULTIPLIER_REACTION)

//Nitsche Variables
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, double, NITSCHE_STABILIZATION_FACTOR)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, int, EIGENVALUE_NITSCHE_STABILIZATION_SIZE)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, Vector, EIGENVALUE_NITSCHE_STABILIZATION_VECTOR)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, int, BUILD_LEVEL)

// SBM Variables 
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, Matrix, INTEGRATION_POINTS)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, Vector, INTEGRATION_WEIGHTS)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, std::string, BOUNDARY_CONDITION_TYPE)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, std::string, CONDITION_NAME)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, std::string, LAYER_NAME)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, Vector, KNOT_VECTOR_U)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, Vector, KNOT_VECTOR_V)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, Vector, KNOT_VECTOR_W)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, Vector, KNOT_SPAN_SIZES)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, std::vector<Vector>, PARAMETER_SPACE_CORNERS)

KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, Node::Pointer, PROJECTION_NODE)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, typename std::vector<Geometry<Node>::Pointer>, NEIGHBOUR_GEOMETRIES)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, int, PROJECTION_NODE_ID)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, std::vector<std::string>, CONNECTED_LAYERS)
KRATOS_DEFINE_APPLICATION_VARIABLE(IGA_APPLICATION, std::vector<std::string>, CONNECTED_CONDITIONS)

} // namespace Kratos

#endif // !defined(KRATOS_IGA_APPLICATION_VARIABLES_H_INCLUDED)